﻿using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Text;

namespace EBA.Framework
{
    /// <summary>
    /// 运行在独立线程中的远程插件上下文
    /// </summary>
    [Export("RemotingThreadBundleContext", typeof(IBundleContext))]
    public class RemotingThreadBundleContext:RemotingBundleContext
    {
         /// <summary>
        /// 构造函数。初始化插件启动器<see cref="RemotingThreadBundleLauncher"/>。
        /// </summary>
        public RemotingThreadBundleContext()
        {
            
        }


        public override void Initialize<TBundle>(string runtime, string startupPath, string bundleId)
        {
            this.BundleLauncher = new RemotingThreadBundleLauncher<TBundle>();
            base.Initialize<TBundle>(runtime, startupPath, bundleId);
        }

        /// <summary>
        /// 名称
        /// </summary>
        public override string Name
        {
            get { return "RemotingThreadBundleContext"; }
        }
    }
}
